package io3;
/**
 * 反序列
 */

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class OSWDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
          FileInputStream fis=new FileInputStream("Student.txt");
          ObjectInputStream obj=new ObjectInputStream(fis);
          Object ojj=obj.readObject();
          Student zs=(Student)ojj;
        System.out.println(zs);
        obj.close();















        //        FileInputStream fis=new FileInputStream("Student.txt");
//        ObjectInputStream ois=new ObjectInputStream(fis);
//        Object obj=ois.readObject();
//        Student zs=(Student) obj;
//        System.out.println(zs);
//        ois.close();
    }
}
